import { createSlice } from "@reduxjs/toolkit";

export const useTokenSlice = createSlice({
  name: "token",
  initialState: {
    token: "",
  },
  reducers: {
    setToken(state, action) {
      state.token = action.payload;
    },
  },
});

export const { setToken } = useTokenSlice.actions;
export default useTokenSlice.reducer;
